﻿<common:LayoutAwarePage
    x:Name="pageRoot"
    x:Class="Gomoku.PlayPage"
    DataContext="{Binding DefaultViewModel, RelativeSource={RelativeSource Self}}"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:Gomoku"
    xmlns:common="using:Gomoku.Common"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <Grid.Background>
            <ImageBrush ImageSource="ms-appx:///Skin/Classic/pagebackground.png" Stretch="None"/>
        </Grid.Background>
        <Grid.RowDefinitions>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal">
            <Grid Width="50"/>
            <Button FontFamily="SketchFlow Print" Foreground="Black" FontSize="32" Width="200" BorderThickness="0" Content="Back" Click="backButton_Click">
                <Button.Background>
                    <ImageBrush ImageSource="ms-appx:///Skin/Classic/buttonbackground.png" Stretch="None"/>
                </Button.Background>
            </Button>
            <Grid Width="50"/>
            <Button FontFamily="SketchFlow Print" Foreground="Black" FontSize="32" Width="200" BorderThickness="0" Content="Restart" Click="restartButton_Click">
                <Button.Background>
                    <ImageBrush ImageSource="ms-appx:///Skin/Classic/buttonbackground.png" Stretch="None"/>
                </Button.Background>
            </Button>
        </StackPanel>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition/>
                <ColumnDefinition Width="200"/>
                <ColumnDefinition Width="100"/>
            </Grid.ColumnDefinitions>

            <StackPanel Grid.Column="1" HorizontalAlignment="Stretch" Height="200">
                <StackPanel.Background>
                    <ImageBrush ImageSource="ms-appx:///Skin/Classic/buttonbackground.png" Stretch="None"/>
                </StackPanel.Background>
                <Grid Height="50"/>
                <TextBlock x:Name="blackPlayerTextBlock" FontFamily="SketchFlow Print" Foreground="Black" FontSize="32" HorizontalAlignment="Center"/>
                <Grid Height="50"/>
                <Image x:Name="blackStoneImage" Width="50" Height="50" Source="ms-appx:///Skin/Classic/blackstone.png"/>
            </StackPanel>

            <Grid Grid.Column="2" x:Name="boardGrid" Width="600" Height="600" PointerPressed="boardGrid_PointerPressed">

            </Grid>

            <StackPanel Grid.Column="3" HorizontalAlignment="Stretch" Height="200">
                <StackPanel.Background>
                    <ImageBrush ImageSource="ms-appx:///Skin/Classic/buttonbackground.png" Stretch="None"/>
                </StackPanel.Background>
                <Grid Height="50"/>
                <TextBlock x:Name="whitePlayerTextBlock" FontFamily="SketchFlow Print" Foreground="White" FontSize="32" HorizontalAlignment="Center"/>
                <Grid Height="50"/>
                <Image x:Name="whiteStoneImage" Visibility="Collapsed" Width="50" Height="50" Source="ms-appx:///Skin/Classic/whitestone.png"/>
            </StackPanel>
        </Grid>
    </Grid>
</common:LayoutAwarePage>
